;decrapted

(defn write-daa
  "pruebas ok esto ya escribe cualquier pendejada en el archivo"
  []
  (let [
    string "Hola Mundo"
    file (File. "C:\\zenkai\\db-1x2.db")
    fos (FileOutputStream. file)
    ]
    (.write fos (.getBytes string))
    (.close fos)))
    
;-------------------------------------------------------------------------------
(defn write
  "Alfa, write a character or a string in the given position"
  [position]
  (with-open [raf (RandomAccessFile. (File. "db-1x2.db") "rw")]
  (let [
    string "Hola Mundo"
    ;raf (RandomAccessFile. file "rw")
    ]
    (.seek raf position)
    ;(.write raf (.getBytes string))
    (.write raf 0x80)
    (.close raf)
    )))
;-------------------------------------------------------------------------------
(defn wri
  "Alfa, write a character or a string in the given position
  and calls go to start data"
  []
  (with-open [raf (RandomAccessFile. (File. "db-1x2.db") "rw")];, file (File. "db-1x2.db")]
  (let [
    string "Hola Mundo"
    ;raf (RandomAccessFile. file "rw")
    ]
    ;(.seek raf 8);esto si hd
    ;(read-fields-meta (File. "db-1x2.db")
    ;(print );esto tambien hd
    ;(print (rseq (read-fields-meta raf (Integer. (str (.read raf) (.read raf))))))
    ;(print (.read raf))
    ;(.write raf (.getBytes string))
    ;(.write raf 00)
    ;(.close raf)
    (go-to-start-of-real-data raf)
    (print (.read raf))
    (print (.read raf))
    )
    ))
;-------------------------------------------------------------------------------
(defn calculate-offset-daa
  "prueba"
  []
  (with-open [raf (RandomAccessFile. (File. "db-1x2.db") "rw")]
    (let [
      of 8
      ]
      ;(+ of raro)
      (.seek raf 10)
      (count-schema-bytes raf 7))
      ))
